﻿@model UscSunShine.Mvc.Models.RoleViewModel

@{
    ViewBag.Title = "角色详情";
}

<h2>角色详情</h2>

<div>
    <h4>角色用户</h4>
    <hr />
    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model=>model.Name)
        </dt>
        <dd>
            @Html.DisplayFor(model => model.Name)
        </dd>
        <dt>
            @Html.DisplayNameFor(model => model.Description)
        </dt>
        <dd>
            @Html.DisplayFor(model => model.Description)
        </dd>
    </dl>
</div>
<h4>目前在该角色内的用户清单：</h4>
@if (ViewBag.UserCount == 0)
{
    <hr />
    <p>该角色内暂时没有用户。</p>
}

<table class="table">

    @foreach (var item in ViewBag.Users)
    {
        <tr>
            <td>
                @item.UserName
            </td>
        </tr>
    }
</table>
<p>
    @Html.ActionLink("编辑角色", "Edit", new { id = Model.Id }, new { @class = "btn btn-warning" }) |
    @Html.ActionLink("返回角色列表", "Index")
</p>